~&gt; <span class="sgr-32">if</span><span class="sgr-"> </span><span class="sgr-35">$true</span><span class="sgr-"> </span><span class="sgr-1">{</span><span class="sgr-"> </span><span class="sgr-32">echo</span><span class="sgr-"> good </span><span class="sgr-1">}</span><span class="sgr-"> </span><span class="sgr-33">else</span><span class="sgr-"> </span><span class="sgr-1">{</span><span class="sgr-"> </span><span class="sgr-32">echo</span><span class="sgr-"> bad </span><span class="sgr-1">}</span>               
good
~&gt; <span class="sgr-32">for</span><span class="sgr-"> </span><span class="sgr-35">x</span><span class="sgr-"> </span><span class="sgr-1">[</span><span class="sgr-">lorem ipsum</span><span class="sgr-1">]</span><span class="sgr-"> </span><span class="sgr-1">{</span>
     <span class="sgr-32">echo</span><span class="sgr-"> </span><span class="sgr-35">$x</span><span class="sgr-">.pdf</span>
   <span class="sgr-1">}</span>
lorem.pdf
ipsum.pdf
~&gt; <span class="sgr-32">try</span><span class="sgr-"> </span><span class="sgr-1">{</span>
     <span class="sgr-32">fail</span><span class="sgr-"> </span><span class="sgr-33">&#39;bad error&#39;</span>
   <span class="sgr-1">}</span><span class="sgr-"> </span><span class="sgr-33">except</span><span class="sgr-"> </span><span class="sgr-35">e</span><span class="sgr-"> </span><span class="sgr-1">{</span>
     <span class="sgr-32">echo</span><span class="sgr-"> error </span><span class="sgr-35">$e</span>
   <span class="sgr-1">}</span><span class="sgr-"> </span><span class="sgr-33">else</span><span class="sgr-"> </span><span class="sgr-1">{</span>
     <span class="sgr-32">echo</span><span class="sgr-"> ok</span>
   <span class="sgr-1">}</span>
error ?(fail 'bad error')
